package org.dcits.controller;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class PageJumpController {
	
//	@RequestMapping("/page/{pageName}")
//	public ModelAndView pageJump(@PathVariable("pageName") String pageName,HttpSession session) {
//		session.setAttribute("userId", "1111");
//		return new ModelAndView(pageName);
//	}
	
	@RequestMapping("/page/test/{pageName}")
	public String pageJumpTest(@PathVariable("pageName") String pageName,HttpSession session) {
		session.setAttribute("userId", "1");
		return pageName;
	}
	
	@RequestMapping("/page/{pageName}")
	public String pageJump(@PathVariable("pageName") String pageName) {
		return pageName;
	}
}
